package com.hsgene.common.util.web.access.exception;

import com.hsgene.common.util.exception.ErrorCode;

/**
 * 账号在另一设备登录异常（顶号处理）.
 *
 * @author wangbing
 * @version 1.0, 2018/7/6
 */
public class TokenLoggedOtherException extends TokenException {

    private static final long serialVersionUID = 6567610167402989471L;

    // 顶号提示
    private final static ErrorCode errorCode = new ErrorCode() {
        @Override
        public int getCode() {
            return 10012;
        }

        @Override
        public String getMessage() {
            return "Error_Users_User_Token_Logged_Other";
        }

        @Override
        public String getDescription() {
            return "用户在其它设备登录";
        }
    };

    @Override
    public ErrorCode getErrorCode() {
        return errorCode;
    }

    public TokenLoggedOtherException() {
        super();
    }

    public TokenLoggedOtherException(String message) {
        super(message);
    }

    public TokenLoggedOtherException(Throwable cause) {
        super(cause);
    }

    public TokenLoggedOtherException(String message, Throwable cause) {
        super(message, cause);
    }

    public TokenLoggedOtherException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
    }
}
